package router

import (
	"k8s-admin/controller/kubernetes"
	"k8s-admin/middleware"

	"github.com/gin-gonic/gin"
)

func Cluster(r *gin.Engine) {
	cluster := r.Group("cluster", middleware.ChecKToken())
	cluster.Use(middleware.ChecKToken(), middleware.CasbinMiddle())
	{
		cluster.POST("/createCluster", kubernetes.CreateK8sCluster)
		cluster.GET("/listK8sCluster", kubernetes.ListK8sCluster)
		cluster.DELETE("/deleteK8sCluster", kubernetes.DeleteK8sCluster)
	}
}
